package com.zhny.aiot.control.cabinet.plugin.model;

import com.zhny.aiot.plugin.ActionValue;
import com.zhny.aiot.plugin.PropertyValue;
import com.zhny.aiot.plugin.model.*;
import lombok.Data;

@Data
public class ControlCabinetStoreEntry extends StoreEntity {
    @PropertyValue(alias = "电动蝶阀1",description = "电动蝶阀1状态",unit = "",icon=IconConstract.Other,variableType=VariableType.Passage,actions={
            @ActionValue(name=Operate.Open,commandCode="openValve1",eventType=EventType.Click),
            @ActionValue(name=Operate.Close,commandCode="closeValve1",eventType=EventType.Click)
    })
    private Boolean valve1status;
    @PropertyValue(alias = "电动蝶阀2",description = "电动蝶阀2状态",unit = "",icon=IconConstract.Other,variableType=VariableType.Passage,actions={
            @ActionValue(name=Operate.Open,commandCode="openValve2",eventType=EventType.Click),
            @ActionValue(name=Operate.Close,commandCode="closeValve2",eventType=EventType.Click)
    })
    private Boolean valve2status;
    @PropertyValue(alias = "调压阀电源",description = "调压阀1电源状态",unit = "",icon=IconConstract.Other,variableType=VariableType.Passage,actions={
            @ActionValue(name=Operate.Open,commandCode="powerSupply",eventType=EventType.Click),
            @ActionValue(name=Operate.Close,commandCode="powerFailure",eventType=EventType.Click)
    })
    private Boolean powerSupply;
    @PropertyValue(alias = "压力表1",description = "压力值1",unit = "MPa",icon=IconConstract.Pressure,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check,commandCode="queryPreAndAdValve",eventType=EventType.Click)
    })
    private Float pressure1;
    @PropertyValue(alias = "压力表2",description = "压力值2",unit = "MPa",icon=IconConstract.Pressure,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check,commandCode="queryPreAndAdValve",eventType=EventType.Click)
    })
    private Float pressure2;
    @PropertyValue(alias = "压力表3",description = "压力值3",unit = "MPa",icon=IconConstract.Pressure,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check,commandCode="queryPreAndAdValve",eventType=EventType.Click)
    })
    private Float pressure3;
    @PropertyValue(alias = "压力表4",description = "压力值4",unit = "MPa",icon=IconConstract.Pressure,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check,commandCode="queryPreAndAdValve",eventType=EventType.Click)
    })
    private Float pressure4;
    @PropertyValue(alias = "压力表5",description = "压力值5",unit = "MPa",icon=IconConstract.Pressure,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check,commandCode="queryPreAndAdValve",eventType=EventType.Click)
    })
    private Float pressure5;
    @PropertyValue(alias = "压力表6",description = "压力值6",unit = "MPa",icon=IconConstract.Pressure,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check,commandCode="queryPreAndAdValve",eventType=EventType.Click)
    })
    private Float pressure6;
    @PropertyValue(alias = "调压阀1开度",description = "调压阀门1开合度",unit = "%",icon=IconConstract.Other,variableType=VariableType.AdJustableValve,actions={
            @ActionValue(name=Operate.Query,commandCode="queryPreAndAdValve",eventType=EventType.Click),
            @ActionValue(name=Operate.Value,commandCode="setAdValve1",paramClass=AdjustableParam.class,eventType=EventType.Input),
            @ActionValue(name=Operate.Init,commandCode="initialize",eventType=EventType.Click)
    })
    private Float adValve1status;
    @PropertyValue(alias = "调压阀2开度",description = "调压阀门2开合度",unit = "%",icon=IconConstract.Other,variableType=VariableType.AdJustableValve,actions={
            @ActionValue(name=Operate.Query, commandCode="queryPreAndAdValve", eventType=EventType.Click),
            @ActionValue(name=Operate.Value,commandCode="setAdValve2",paramClass=AdjustableParam.class,eventType=EventType.Input),
            @ActionValue(name=Operate.Init,commandCode="initialize",eventType=EventType.Click)
    })
    private Float adValve2status;
    @PropertyValue(alias = "瞬时流量1",description = "瞬时流量1值",unit = "m3/h",icon=IconConstract.Flow,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="queryFlow", eventType=EventType.Click)
    })
    private Float flow1;
    @PropertyValue(alias = "瞬时流速1",description = "瞬时流速1值",unit = "m/s",icon=IconConstract.Flow,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="queryFlow", eventType=EventType.Click)
    })
    private Float flowSpeed1;
    @PropertyValue(alias = "累计流量1",description = "累计流量1值",unit = "m3",icon=IconConstract.Flow,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="queryFlow", eventType=EventType.Click)
    })
    private Float totalFlow1;

    @PropertyValue(alias = "瞬时流量2",description = "瞬时流量2值",unit = "m3/h",icon=IconConstract.Flow,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="queryFlow", eventType=EventType.Click)
    })
    private Float flow2;
    @PropertyValue(alias = "瞬时流速2",description = "瞬时流速2值",unit = "m/s",icon=IconConstract.Flow,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="queryFlow", eventType=EventType.Click)
    })
    private Float flowSpeed2;
    @PropertyValue(alias = "累计流量2",description = "累计流量2值",unit = "m3",icon=IconConstract.Flow,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="queryFlow", eventType=EventType.Click)
    })
    private Float totalFlow2;

//    @Override
//    public String toString(){
//        StringBuilder builder = new StringBuilder();
//        builder.append("va")
//    }
}
